/**
 * @description Product Model
 * @author boen
 */

const mongoose = require('../db/db')

const Schema = mongoose.Schema({
    shopId: {
        type: String,
        require: true
    }, // 对应商店id
    name: String,
    imgUrl: String,
    sale: Number,
    price: Number,
    oldPrice: Number,
    tabs: [String] // 如：tabs:['a','b',...]
}, {
    timestamps: true
})

const Product = mongoose.model('poroduct', Schema)

module.exports = Product